About Control Property Substitution

Runtime properties of VBVoice control properties can be used in the greeting and setup fields of other VBVoice controls using a mechanism called control property substitution.

What are Its Uses?

This substitution mechanism serves many useful functions. For example, you can add this type of functionality to your application to:

Read more about how you can use control property substitution.

Which Controls Can Use It?

Any control where you can substitute one property for another. Many, but not all, VBVoice DataFind, Dial, and WebQuery controls have this functionality.

Access the property page of a control and look for a field with the Control List button next to it. The image below shows the property pages for Dial control.

To view the Control List dialog, click on the control list button. The dialog appears as below:

In the example above, select the Frame, Page, and Control that contains the data you want (in this case the number to dial). The properties of the selected control will be listed in the Available Properties box. Select the property you are interested in and drag-and-drop (or copy-paste) its name into the destination (in this case, into the Number To Dial box of the Dial control shown above).

How to Substitute a Control Property Value

There are two ways to substitute a control property value: by entering parameter strings manually or by dragging and dropping from the Control List dialog. Both methods require that you have the Control List dialog open.

Enter Parameter Strings Manually

To substitute a control property value, surround the name of the property with % signs:

EXAMPLE    %MainMenu.Digits%

At runtime, the %xxx% string is replaced with the actual property value.

If you are referring to the default property of a control, the property name extension is optional:

EXAMPLE    %MainMenu%

Dragging and Dropping from the Control List Dialog

To substitute a control property value:

  1. Access the Control List dialog

  2. Select the desired control

  3. Drag the control name (for the default property) or the property name from the Control List dialog to the desired field of the property page. VBVoice automatically adds the %% syntax.

Note: VBVoice uses the control name to identify properties. Therefore, no two control names should have the same name, even if on different forms. This condition is verified during the system check. Visual Basic enforces this rule except when multiple forms are in use.

Control Reference Pages:

In the Control Reference Pages, the properties that are able to use control property substitution are labeled with two symbols.

Properties with the symbol are capable of using control property substitution. They are initial values and therefore, should not be modified once the system is started.

Properties with the symbol are useable for control property substitution.

In order to use control property substitution, a property that is capable of using it () obtains the data from another property that is able to deliver it ()

Read more about special control names.